<template>
	<view class="p-4 text-base">
		<uni-segmented-control :values="tabInfo.items" @clickItem="onClickTabItem" />
		<view v-if="tabInfo.current==0">
			<SingleParam></SingleParam>
		</view>
		<view v-if="tabInfo.current==1">
			<AllParam></AllParam>
		</view>
		<view v-if="tabInfo.current==2">
			<BigStat></BigStat>
		</view>
	</view>
</template>

<script setup>
	import SingleParam from './components/SingleParam.vue';
	import AllParam from './components/AllParam.vue';
	import BigStat from './components/BigStat.vue';
	import {
		ref
	} from 'vue';

	const tabInfo = ref({
		current: 0,
		items: ['单方案', '全方案', '统计'],
	});

	const onClickTabItem = (e) => {
		tabInfo.value.current = e.currentIndex
	};
</script>